Detecting whether a patient has a bacterial infection is important in providing suitable treatment for the patient. Often, this detection can be difficult because of the infection's location, for example, in the lungs or gastrointestinal tract. Methods of detecting the presence of bacteria by measuring isotopically-labeled ratios of volatile gases has been reported. See, e.g., U.S. Pat. No. 7,717,857. Faster methods of detecting those ratios are still needed. Portable machines that can accurately detect those ratios are also still needed.